﻿Imports AccesoDatos

Public Class CatalogoAlmacen

    Public Function BandejaStock(ByVal pstrAlmacen As String, ByVal pstrCodItem As String, ByVal pstrItem As String, ByVal pstrGrupo As String, ByVal pstrParam As String) As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        Dim Parametros(,) As Object = {{"@ALMACEN", SqlDbType.VarChar, UCase(pstrAlmacen)}, _
                                       {"@COD_ITEM", SqlDbType.VarChar, UCase(pstrCodItem)}, _
                                       {"@ITEM", SqlDbType.VarChar, UCase(pstrItem)}, _
                                       {"@GRUPO", SqlDbType.VarChar, UCase(pstrGrupo)}, _
                                       {"@PARAM", SqlDbType.VarChar, UCase(pstrParam)}}
        dsConsultaDatos = objCom.ExecSPDataSetCP("SP_BANDEJA_STOCK", Parametros)
        Return dsConsultaDatos
    End Function

    Public Function ActualizaMiStock(ByVal pstrAlmacen As String, ByVal pstrCodItem As String, ByVal pstrCtd1 As String) As Integer
        Dim dsConsultaDatos As Integer
        Dim objCom As New BaseDatos
        Dim Parametros(,) As Object = {{"@ALMACEN", SqlDbType.VarChar, UCase(pstrAlmacen)}, _
                                       {"@COD_ITEM", SqlDbType.VarChar, UCase(pstrCodItem)}, _
                                       {"@CTD1", SqlDbType.VarChar, UCase(pstrCtd1)}}
        dsConsultaDatos = objCom.ExecSPIntegerCP("SP_ACTUALIZA_MISTOCK", Parametros)
        Return dsConsultaDatos
    End Function

    Public Function CierraCaja(ByVal pstrAlmacen As String, ByVal pstrTipo As String, ByVal pstrUsuario As String) As Integer
        Dim dsConsultaDatos As Integer
        Dim objCom As New BaseDatos
        Dim Parametros(,) As Object = {{"@LOCAL", SqlDbType.VarChar, UCase(pstrAlmacen)}, _
                                       {"@PARAM", SqlDbType.VarChar, UCase(pstrTipo)}, _
                                       {"@USUARIO", SqlDbType.VarChar, UCase(pstrUsuario)}}
        dsConsultaDatos = objCom.ExecSPIntegerCP("SP_CIERRACAJA", Parametros)
        Return dsConsultaDatos
    End Function

End Class
